//
//  CSS.h
//  CSUIKit
//
//  Created by 网新中研 on 16/7/22.
//  Copyright © 2016年 centralsoft. All rights reserved.
//

#ifndef CSS_h
#define CSS_h

//导航栏参数定义
#define TITLE_LABEL_HEIGHT 63//标题高度
#define TITLE_LINE_HEIGHT 1//线条高度

#define HEIGHT_STATUSBAR [[UIApplication sharedApplication] statusBarFrame].size.height//状态栏高度

#define HEIGHT_NAVIGATIONBAR (HEIGHT_STATUSBAR == 44.0 ? 88 : 64)//导航栏高度
#define HEIGHT_CONTENT (kWindowH - HEIGHT_NAVIGATIONBAR) //内容区域高度 其中64位导航条+状态栏的高度

/*********************************************颜色***********************************************/

//自定义颜色
#define COLOR_F_GRAY [UIColor colorFromHexCode:@"#999"]
#define COLOR_F_BLACK [UIColor colorFromHexCode:@"#333"]
#define COLOR_F_RED [UIColor colorFromHexCode:@"#b00000"]
#define COLOR_DEEP_BLUE [UIColor colorFromHexCode:@"#173f6f"]//深蓝色
#define COLOR_LITTLE_DEEP_BLUE [UIColor colorFromHexCode:@"#f9f9f9"]//略深蓝色
#define COLOR_SKY_BLUE [UIColor colorFromHexCode:@"#6bbafc"]//天蓝色
#define COLOR_DEEP_GRAY [UIColor colorFromHexCode:@"#e6e6e6"]//深灰色
#define COLOR_DIMGGREY [UIColor colorFromHexCode:@"#696969"] //暗灰色
#define COLOR_LIGHT_GRAY [UIColor colorFromHexCode:@"#f7f7f7"]//浅灰色
#define COLOR_BIGRED [UIColor colorFromHexCode:@"#b00000"]//大红色
#define COLOR_SMOOTH_RED [UIColor colorFromHexCode:@"fe3116"]//柔顺的红色
#define COLOR_WHITE [UIColor whiteColor]//白色

//系统主题色
//#define COLOR_THEME COLOR_DEEP_BLUE//系统主题色
//#define COLOR_THEME [UIColor purpleColor]//系统主题色
#define COLOR_THEME [UIColor colorFromHexCode:@"0a87ff"]//系统主题色



//系统颜色
#define COLOR_BORDER_BOTTOM [UIColor colorFromHexCode:@"dddddd"]//下划线颜色
#define COLOR_BACKGROUND [UIColor colorFromHexCode:@"#f9f9f9"] //背景色
#define COLOR_TOP_SEPERATOR_LINE [UIColor colorFromHexCode:@"e7e7e7"] //背景色
#define COLOR_BUTTON_BACK COLOR_THEME//按钮背景色
//#define COLOR_BUTTON_BACK COLOR_CONTROLER_BACKGROUND//按钮背景色
#define COLOR_RIGHT [UIColor colorFromHexCode:@"#f8f8f8"]//按钮背景色
#define COLOR_SELECTED COLOR_THEME//选中颜色
//#define COLOR_SELECTED COLOR_CONTROLER_BACKGROUND//选中颜色
#define COLOR_UNSELECTED [UIColor colorFromHexCode:@"#DCDCDC"];//未选中时颜色
#define COLOR_PAGE_BACKGROUND [UIColor colorFromHexCode:@"f3f3f3"]//页面背景色
#define COLOR_TEXT [UIColor colorFromHexCode:@"333333"]//文字颜色
#define COLOR_TEXT_0 [UIColor colorFromHexCode:@"000000"]//文字颜色
#define COLOR_TEXT_1 [UIColor colorFromHexCode:@"333333"]//文字颜色
#define COLOR_TEXT_2 [UIColor colorFromHexCode:@"666666"]//文字颜色
#define COLOR_TEXT_3 [UIColor colorFromHexCode:@"999999"]//文字颜色
#define COLOR_PAGE_ELEMENT_BACKGROUND COLOR_PAGE_BACKGROUND//页面元素背景色



//系统主题色
#define COLOR_THEME_DISABLE [UIColor colorWithRed:(23/255.0) green:(63/255.0) blue:(111/255.0) alpha:.5f]

//#define COLOR_THEME [UIColor colorFromHexCode:@"969feb"]//系统主题色
#define COLOR_THEME_BACKGROUND COLOR_THEME//系统主题色：背景
#define COLOR_THEME_TITLE_BACKGROUND COLOR_THEME//系统主题色：标题背景
#define COLOR_THEME_TITLE_TEXT COLOR_WHITE//系统主题色：标题文字
#define COLOR_THEME_BUTTON_BACKGROUND COLOR_THEME//系统主题色：按钮背景
#define COLOR_THEME_BUTTON_TEXT COLOR_WHITE//系统主题色：按钮文字颜色


//控件主题色
//#define COLOR_CONTROLER_BACKGROUND COLOR_SKY_BLUE //控件主题色：蓝色
#define COLOR_CONTROLER_BACKGROUND COLOR_THEME //控件主题色：蓝色
#define COLOR_CONTROLER_SELECTED_MAIN COLOR_DEEP_GRAY //控件主题色：复选弹出框，主类选中时的颜色
#define COLOR_CONTROLER_UNSELECTED_MAIN [UIColor whiteColor] //控件主题色：复选弹出框，主类选中时的颜色
#define COLOR_CONTROLER_SELECTED_SUB COLOR_LIGHT_GRAY //空间主题色：复选弹出框，子类选中时的颜
#define COLOR_CONTROLER_UNSELECTED_SUB [UIColor whiteColor] //控件主题色：复选弹出框，子类选中时的颜色色
#define COLOR_CONTROLER_BUTTON COLOR_THEME//控件主题色: 按钮

//导航条主题色
#define COLOR_NAVIGATIONBAR_BACKGROUND COLOR_THEME_BACKGROUND //导航条颜色：背景
#define COLOR_NAVIGATIONBAR_TITLE COLOR_THEME_TITLE_TEXT //导航条颜色：标题

//导航栏参数定义
#define TITLE_LABEL_HEIGHT 60//标题高度
#define TITLE_LINE_HEIGHT 1//线条高度
#define TITLE_LABEL_TEXT_COLOR COLOR_NAVIGATIONBAR_TITLE//导航栏标题颜色
#define TITLE_LABEL_BACKGROUD_COLOR COLOR_NAVIGATIONBAR_BACKGROUND//导航栏背景色
#define TITLE_LINE_COLOR @"#b4b4b4"//线条颜色

#define COLOR_DEVELOPMENT [UIColor colorFromHexCode:@"CDEBFE"]


/***************************************************************************************************/


/*********************************************字体大小***********************************************/
#define CORNER_RADIUS 5.0
/***************************************************************************************************/




/*********************************************字体大小***********************************************/
#define FONT_SIZE_0 18.0
#define FONT_SIZE_1 15.0
#define FONT_SIZE_2 14.0
#define FONT_SIZE_3 13.0
/***************************************************************************************************/


/*********************************************字体大小***********************************************/

#define FONT_SIZE_REM 15.0

//查询栏字体
#define FONT_SIZE_QUERY_PANEL_INPUT (FONT_SIZE_REM * 1.0)//查询栏字体：输入单元格
#define FONT_SIZE_QUERY_PANEL_BUTTOM (FONT_SIZE_REM * 1.2)//查询栏字体：按钮字体

//弹出框字体
#define FONT_SIZE_POP_VIEW_TITLE 19.0 //弹出框字体：标题文字大小
#define FONT_SIZE_POP_CHOOSE_TYPE_CELL_1 16.0 //弹出框字体：主体类型选择框单元格字体大小1
#define FONT_SIZE_POP_CHOOSE_TYPE_CELL_2 15.0 //弹出框字体：主体类型选择框单元格字体大小2
#define FONT_SIZE_POP_SELECT_CELL 18.0//弹出框字体：选择栏字体大小

/***************************************************************************************************/





/*********************************************间距***********************************************/

//查询栏尺寸
#define QUERY_PANEL_BUTTON_MARGIN 13.0 //搜索栏间隔
#define QUERY_PANEL_BUTTON_WIDTH (kWindowW - 3 * QUERY_PANEL_BUTTON_MARGIN) / 2 //搜索栏按钮宽度
#define QUERY_PANEL_BUTTON_WIDTH_FOR_BUTTON_COUNT(BUTTON_COUNT_FOR_EACH_ROW) ((kWindowW - (BUTTON_COUNT_FOR_EACH_ROW + 1) * QUERY_PANEL_BUTTON_MARGIN) / BUTTON_COUNT_FOR_EACH_ROW) //搜索栏按钮宽度
#define QUERY_PANEL_BUTTON_HEIGHT 30.0 //搜索栏按钮高度

//单元格相关数据
#define CELL_HEIGHT 45.0//单元格高度
#define CELL_COLOR_TITLE [UIColor blackColor]
#define CELL_COLOR_DATA [UIColor blackColor]
#define CELL_CONTENT_HEIGHT 20.0
#define CELL_SEPERATOR_LINE_HEIGHT 1.0
#define CELL_CONTENT_MARGIN_HEIGHT ((CELL_HEIGHT - CELL_CONTENT_HEIGHT)/2.0)

#define CELL_TITLE_WIDTH 90.0//左侧标题宽度
#define CELL_LABLE_HEIGHT 24.0
#define CELL_TOP_MARGIN CELL_CONTENT_MARGIN_HEIGHT
#define CELL_BOTTOM_MARGIN CELL_CONTENT_MARGIN_HEIGHT
#define CELL_RIGHT_MARGIN 20.0
#define CELL_EDIT_RIGHT_MARGIN (CELL_RIGHT_MARGIN)
#define CELL_SEPERATOR_MARGIN_LEFT MARGIN_SEPERATOR_LINE_LEFT
#define CELL_SEPERATOR_LINE_HEIGHT 1.0

//自定义风格参数
#define MARGIN_SEPERATOR_LINE_LEFT 10.0

//保存页面尺寸
#define PAGE_BUTTON_HEIGHT 40.0//页面按钮尺寸
#define PAGE_BUTTON_MARGIN QUERY_PANEL_BUTTON_MARGIN//页面按钮间隔
#define PAGE_BUTTON_WIDTH_FOR_BUTTON_COUNT(BUTTON_COUNT_FOR_EACH_ROW) ((kWindowW - (BUTTON_COUNT_FOR_EACH_ROW + 1) * PAGE_BUTTON_MARGIN) / BUTTON_COUNT_FOR_EACH_ROW) //页面按钮宽度
#define PAGE_BUTTON_SAVE_HEIGHT 35.0//页面保存按钮高度

#define POP_VIEW_CORNER_RADIUS 15.0//弹出框圆角半径

/***************************************************************************************************/


/*********************************************界面风格***********************************************/
#define HEIGHT_DOWN_ARROW_ICON 15.0
/***************************************************************************************************/



/*********************************************界面风格***********************************************/

//风格：按钮
#define STYLE_BUTTON(BUTTON) \
BUTTON.backgroundColor = COLOR_BUTTON_BACK;\
[BUTTON setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];\
BUTTON.layer.cornerRadius = 5\

//风格：保存按钮
#define STYLE_SAVE_BUTTON(BUTTON)\
[BUTTON setTitleColor:COLOR_THEME_BUTTON_TEXT forState:UIControlStateNormal];\
BUTTON.backgroundColor = COLOR_THEME;\
BUTTON.layer.cornerRadius = 5;\
BUTTON.titleLabel.font = [UIFont systemFontOfSize:16.0];\

//风格：辅助按钮
#define STYLE_OTHER_BUTTON(BUTTON)\
[BUTTON setTitleColor:COLOR_THEME_BUTTON_TEXT forState:UIControlStateNormal];\
BUTTON.backgroundColor = COLOR_THEME;\
BUTTON.layer.cornerRadius = 5;\
BUTTON.titleLabel.font = [UIFont systemFontOfSize:16.0];\

//风格：按钮(边角为半圆形)
#define STYLE_BUTTON_ROUND(BUTTON) \
BUTTON.backgroundColor = COLOR_BUTTON_BACK;\
[BUTTON setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];\
BUTTON.layer.cornerRadius = BUTTON.frame.size.height/2.0\

//风格：按钮（定位）
#define STYLE_BUTTON_LOCATION(BUTTON) \
BUTTON.backgroundColor = [UIColor clearColor];\
[BUTTON setTitleColor:COLOR_THEME forState:UIControlStateNormal];\
BUTTON.layer.borderWidth = 1; \
BUTTON.layer.borderColor = COLOR_THEME.CGColor; \


//风格:选中按钮
#define STYLE_SELECT_BUTTON(BUTTON) \
BUTTON.backgroundColor = COLOR_SELECTED;\
[BUTTON setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];\

//风格：未选中按钮
#define STYLE_UNSELECT_BUTTON(BUTTON) \
BUTTON.backgroundColor = COLOR_UNSELECTED;\
[BUTTON setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];\

//风格：分割线
#define STYLE_SEPERATOR_LINE(VIEW) \
VIEW.backgroundColor = COLOR_TOP_SEPERATOR_LINE;\

//风格：表格
#define STYLE_TABLE_VIEW(TABLEVIEW)\
TABLEVIEW.tableHeaderView = [UIView new];\
TABLEVIEW.tableFooterView = [UIView new];\
TABLEVIEW.bounces = YES;\

//风格：带表格下方刷新按钮
#define STYLE_TABLE_VIEW_WITH_REFRESH_FOOTER(TABLEVIEW)\
STYLE_TABLE_VIEW(TABLEVIEW);\
TABLEVIEW.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingTarget:self refreshingAction:@selector(loadMoreData)];\
TABLEVIEW.mj_footer.automaticallyHidden = YES;\

//风格：滚动条
#define STYLE_SCROLL_VIEW(SCROLLVIEW)\
SCROLLVIEW.backgroundColor = COLOR_PAGE_BACKGROUND;\

//风格：移除TableView分割线
#define STYLE_TABLE_VIEW_NO_SEPERATOR(TABLEVIEW)\
TABLEVIEW.seperatorStyle = NO;\

#define STYLE_DEVELOPMENT(VIEW)\
VIEW.layer.borderColor = COLOR_DEVELOPMENT.CGColor;\
//VIEW.layer.borderWidth = 2.0;\
VIEW.layer.cornerRadius = 5;\
VIEW.layer.masksToBounds = YES;\


#define STYLE_UNDEVELOPMENT(VIEW)\
VIEW.layer.borderColor = COLOR_DEVELOPMENT.CGColor;\
VIEW.layer.borderWidth = 0.0;\
VIEW.backgroundColor = [UIColor clearColor];\
VIEW.layer.opacity = 1.0;\


/***************************************************************************************************/

#endif /* CSS2016_h */
